<template>
	<view class="main">
		<view class="list flex align between" v-for="(item,index) in 3" :key="index">
			<image src="../../static/images/manage/icon1.png"></image>
			<view class="list-info">
				<view><text>姓名：</text>xxx</view>
				<view><text>电话：</text>xxx</view>
			</view>
			<view class="list-btn">删除</view>
		</view>
		<!-- 按钮 -->
		<view class="btn" @click="show = true">添加BDM</view>
		<!-- 弹窗 -->
		<view class="lody" v-if="show">
			<view class="lo-con">
				<view class="lo-tit">添加BDM</view>
				<view class="input flex align">
					<view>姓名</view>
					<input placeholder="请输入姓名" />
				</view>
				<view class="input flex align">
					<view>电话</view>
					<input placeholder="请输入姓名" />
				</view>
				<view class="flex align between">
					<view class="lo-btn" style="background: gray;" @click="show=false">取消</view>
					<view class="lo-btn">立即添加</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		companyInfo
	} from '@/api/apiData.js';
	export default {
		data() {
			return {
				show: false
			};
		},
		onShow() {
			// this.getInfo()
		},
		methods:{
			async getInfo(){
				const result = await companyInfo()
			}
		}
	}
</script>

<style lang="scss" scoped>
	.main {
		margin: 24rpx;

		.list {
			padding: 20rpx 30rpx;
			background: white;
			border-radius: 12rpx;
			box-shadow: 1rpx 1rpx 5rpx 1rpx gainsboro;
			margin-bottom: 38rpx;

			image {
				width: 90rpx;
				height: 90rpx;
				margin-right: 46rpx;
			}

			.list-info {
				font-size: 28rpx;
				width: 60%;

				text {
					color: #B2B2B2;
				}
			}

			.list-btn {
				background: #E13232;
				border-radius: 12rpx;
				width: 110rpx;
				line-height: 49rpx;
				color: white;
				text-align: center;
			}
		}

		.btn {
			position: fixed;
			bottom: 0;
			left: 0;
			width: 100%;
			color: white;
			font-size: 34rpx;
			font-weight: bold;
			text-align: center;
			line-height: 108rpx;
			background: #FF6543;
		}

		.lody {
			position: fixed;
			width: 100%;
			height: 100%;
			left: 0;
			top: 0;
			background: rgba(0, 0, 0, 0.3);
			display: flex;
			align-items: center;
			justify-content: center;

			.lo-con {
				background: white;
				width: 80%;

				.lo-tit {
					font-size: 38rpx;
					font-weight: bold;
					padding: 28rpx;
					text-align: center;
				}

				.input {
					font-size: 32rpx;
					width: 80%;
					margin: 10rpx auto 40rpx;

					input {
						border: solid 1rpx #707070;
						padding: 10rpx;
						margin-left: 20rpx;
					}
				}

				.lo-btn {
					font-size: 32rpx;
					font-weight: bold;
					color: white;
					text-align: center;
					width: 230rpx;
					line-height: 60rpx;
					border-radius: 12rpx;
					background: #FF6543;
					margin: 30rpx auto;
				}
			}
		}
	}
</style>